package com.john.utils.http;

import org.apache.http.Consts;
import org.apache.http.Header;
import org.apache.http.message.BasicHeader;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class HttpHeader {
    private Map<String, Header> headerMaps = new HashMap<String, Header>();

    public static HttpHeader custom() {
        return new HttpHeader();
    }

    private boolean isMobile = false;

    public HttpHeader setIsMobile(boolean isMobile) {
        this.isMobile = isMobile;
        return this;
    }

    public HttpHeader setAttr(String attrName, String attrValue) {
        this.headerMaps.put(attrName,
                new BasicHeader(attrName, attrValue));
        return this;
    }

    public HttpHeader accept(String accept) {
        this.headerMaps.put("Accept" ,
                new BasicHeader("Accept" , accept));
        return this;
    }

    public HttpHeader acceptCharset(String acceptCharset) {
        this.headerMaps.put("Accept-Charset" ,
                new BasicHeader("Accept-Charset" , acceptCharset));
        return this;
    }

    public HttpHeader acceptEncoding(String acceptEncoding) {
        this.headerMaps.put("Accept-Encoding" ,
                new BasicHeader("Accept-Encoding" , acceptEncoding));
        return this;
    }

    public HttpHeader acceptLanguage(String acceptLanguage) {
        this.headerMaps.put("Accept-Language" ,
                new BasicHeader("Accept-Language" , acceptLanguage));
        return this;
    }

    public HttpHeader acceptRanges(String acceptRanges) {
        this.headerMaps.put("Accept-Ranges" ,
                new BasicHeader("Accept-Ranges" , acceptRanges));
        return this;
    }

    public HttpHeader authorization(String authorization) {
        this.headerMaps.put("Authorization" ,
                new BasicHeader("Authorization" , authorization));
        return this;
    }

    public HttpHeader cacheControl(String cacheControl) {
        this.headerMaps.put("Cache-Control" ,
                new BasicHeader("Cache-Control" , cacheControl));
        return this;
    }

    public HttpHeader connection(String connection) {
        this.headerMaps.put("Connection" ,
                new BasicHeader("Connection" , connection));
        return this;
    }

    public HttpHeader cookie(String cookie) {
        this.headerMaps.put("Cookie" ,
                new BasicHeader("Cookie" , cookie));
        return this;
    }

    public HttpHeader Origin(String origin) {
        this.headerMaps.put("Origin" ,
                new BasicHeader("Origin" , origin));
        return this;
    }

    public HttpHeader X_Requested_With(String x_Requested_with) {
        this.headerMaps.put("X-Requested-With" ,
                new BasicHeader("X-Requested-With" , x_Requested_with));
        return this;
    }

    public HttpHeader contentLength(String contentLength) {
        this.headerMaps.put("Content-Length" ,
                new BasicHeader("Content-Length" , contentLength));
        return this;
    }

    public HttpHeader contentType(String contentType) {
        this.headerMaps.put("Content-Type" ,
                new BasicHeader("Content-Type" , contentType));
        return this;
    }

    public HttpHeader date(String date) {
        this.headerMaps.put("Date" ,
                new BasicHeader("Date" , date));
        return this;
    }

    public HttpHeader expect(String expect) {
        this.headerMaps.put("Expect" ,
                new BasicHeader("Expect" , expect));
        return this;
    }

    public HttpHeader from(String from) {
        this.headerMaps.put("From" ,
                new BasicHeader("From" , from));
        return this;
    }

    public HttpHeader host(String host) {
        this.headerMaps.put("Host" ,
                new BasicHeader("Host" , host));
        return this;
    }

    public HttpHeader ifMatch(String ifMatch) {
        this.headerMaps.put("If-Match " ,
                new BasicHeader("If-Match " , ifMatch));
        return this;
    }

    public HttpHeader ifModifiedSince(String ifModifiedSince) {
        this.headerMaps.put("If-Modified-Since" ,
                new BasicHeader("If-Modified-Since" , ifModifiedSince));
        return this;
    }

    public HttpHeader ifNoneMatch(String ifNoneMatch) {
        this.headerMaps.put("If-None-Match" ,
                new BasicHeader("If-None-Match" , ifNoneMatch));
        return this;
    }

    public HttpHeader ifRange(String ifRange) {
        this.headerMaps.put("If-Range" ,
                new BasicHeader("If-Range" , ifRange));
        return this;
    }

    public HttpHeader ifUnmodifiedSince(String ifUnmodifiedSince) {
        this.headerMaps.put("If-Unmodified-Since" ,
                new BasicHeader("If-Unmodified-Since" , ifUnmodifiedSince));
        return this;
    }

    public HttpHeader maxForwards(String maxForwards) {
        this.headerMaps.put("Max-Forwards" ,
                new BasicHeader("Max-Forwards" , maxForwards));
        return this;
    }

    public HttpHeader pragma(String pragma) {
        this.headerMaps.put("Pragma" ,
                new BasicHeader("Pragma" , pragma));
        return this;
    }

    public HttpHeader proxyAuthorization(String proxyAuthorization) {
        this.headerMaps.put("Proxy-Authorization" ,
                new BasicHeader("Proxy-Authorization" , proxyAuthorization));
        return this;
    }

    public HttpHeader range(String range) {
        this.headerMaps.put("Range" ,
                new BasicHeader("Range" , range));
        return this;
    }

    public HttpHeader referer(String referer) {
        this.headerMaps.put("Referer" ,
                new BasicHeader("Referer" , referer));
        return this;
    }

    public HttpHeader te(String te) {
        this.headerMaps.put("TE" ,
                new BasicHeader("TE" , te));
        return this;
    }

    public HttpHeader upgrade(String upgrade) {
        this.headerMaps.put("Upgrade" ,
                new BasicHeader("Upgrade" , upgrade));
        return this;
    }

    public HttpHeader userAgent(String userAgent) {
        this.headerMaps.put("User-Agent" ,
                new BasicHeader("User-Agent" , userAgent));
        return this;
    }

    public HttpHeader warning(String warning) {
        this.headerMaps.put("Warning" ,
                new BasicHeader("Warning" , warning));
        return this;
    }

    public HttpHeader via(String via) {
        this.headerMaps.put("Via" ,
                new BasicHeader("Via" , via));
        return this;
    }

    public HttpHeader keepAlive(String keepAlive) {
        this.headerMaps.put("Keep-Alive" ,
                new BasicHeader("Keep-Alive" , keepAlive));
        return this;
    }

    public String accept() {
        return get("Accept" );
    }

    public String acceptCharset() {
        return get("Accept-Charset" );
    }

    public String acceptEncoding() {
        return get("Accept-Encoding" );
    }

    public String acceptLanguage() {
        return get("Accept-Language" );
    }

    public String acceptRanges() {
        return get("Accept-Ranges" );
    }

    public String authorization() {
        return get("Authorization" );
    }

    public String cacheControl() {
        return get("Cache-Control" );
    }

    public String connection() {
        return get("Connection" );
    }

    public String cookie() {
        return get("Cookie" );
    }

    public String Origin() {
        return get("Origin" );
    }

    public String X_Requested_With() {
        return get("X-Requested-With" );
    }

    public String contentLength() {
        return get("Content-Length" );
    }

    public String contentType() {
        return get("Content-Type" );
    }

    public String date() {
        return get("Date" );
    }

    public String expect() {
        return get("Expect" );
    }

    public String from() {
        return get("From" );
    }

    public String host() {
        return get("Host" );
    }

    public String ifMatch() {
        return get("If-Match " );
    }

    public String ifModifiedSince() {
        return get("If-Modified-Since" );
    }

    public String ifNoneMatch() {
        return get("If-None-Match" );
    }

    public String ifRange() {
        return get("If-Range" );
    }

    public String ifUnmodifiedSince() {
        return get("If-Unmodified-Since" );
    }

    public String maxForwards() {
        return get("Max-Forwards" );
    }

    public String pragma() {
        return get("Pragma" );
    }

    public String proxyAuthorization() {
        return get("Proxy-Authorization" );
    }

    public String referer() {
        return get("Referer" );
    }

    public String te() {
        return get("TE" );
    }

    public String upgrade() {
        return get("Upgrade" );
    }

    public String userAgent() {
        return get("User-Agent" );
    }

    public String via() {
        return get("Via" );
    }

    public String warning() {
        return get("Warning" );
    }

    public String keepAlive() {
        return get("Keep-Alive" );
    }

    private String get(String headName) {
        if (this.headerMaps.containsKey(headName)) {
            return ((Header) this.headerMaps.get(headName)).getValue();
        }
        return null;
    }

    public Header[] build() {
        if ((!this.headerMaps.containsKey("User-Agent" )) || (((Header) this.headerMaps.get("User-Agent" )).toString().trim().equals("User-Agent:" ))) {
            if (this.isMobile) {
                this.headerMaps.put("User-Agent" , new BasicHeader("User-Agent" , HttpReqHead.mobileUserAgents[new Random().nextInt(HttpReqHead.mobileUserAgents.length)]));
            } else {
                this.headerMaps.put("User-Agent" , new BasicHeader("User-Agent" , HttpReqHead.windowUserAgents[new Random().nextInt(HttpReqHead.windowUserAgents.length)]));
            }
        }
        if ((!this.headerMaps.containsKey("Content-Type" )) || (((Header) this.headerMaps.get("Content-Type" )).toString().trim().equals("Content-Type:" ))) {
            this.headerMaps.put("Content-Type" , new BasicHeader("Content-Type" , "application/json; charset=UTF-8" ));
        }
        Header[] headers = new Header[this.headerMaps.size()];
        int i = 0;
        for (Header header : this.headerMaps.values()) {
            headers[i] = header;
            i++;
        }
        this.headerMaps.clear();
        this.headerMaps = null;
        return headers;
    }

    public static class Headers {
        public static final String FORM_URLENCODED = "application/x-www-form-urlencoded" ;
        public static final String TEXT_PLAIN = "text/plain; charset=UTF-8" ;
        public static final String TEXT_HTML = "text/html; charset=UTF-8" ;
        public static final String TEXT_XML = "text/xml; charset=UTF-8" ;
        public static final String APPLICATION_JSON = "application/json; charset=UTF-8" ;
        public static final String CONTENT_CHARSET_ISO_8859_1 = Consts.ISO_8859_1.name();
        public static final String CONTENT_CHARSET_UTF8 = Consts.UTF_8.name();
        public static final String DEF_PROTOCOL_CHARSET = Consts.ASCII.name();
        public static final String CONN_CLOSE = "close" ;
        public static final String KEEP_ALIVE = "keep-alive" ;
        public static final String EXPECT_CONTINUE = "100-continue" ;
    }

    private static class HttpReqHead {
        public static String[] mobileUserAgents = {
                "Mozilla/5.0 (Linux; U; Android 9; zh-cn; Redmi S2 Build/PKQ1.181203.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.7.34" ,
                "Mozilla/5.0 (Linux; Android 9; PCCM00 Build/PKQ1.190223.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; U; Android 10; zh-CN; BKL-AL20 Build/HUAWEIBKL-AL20) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.7.9.1059 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 4.4.4; OPPO R7 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 4.4.4)" ,
                "Mozilla/5.0 (Linux; U; Android 7.1.2; zh-cn; OC106 Build/N2G47H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/9.0 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 9; JAT-AL00 Build/HONORJAT-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9) NABar/1.0" ,
                "Mozilla/5.0 (Linux; U; Android 9; zh-cn; MI 6X Build/PKQ1.180904.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.7.34" ,
                "Mozilla/5.0 (Linux; U; Android 9; zh-CN; Redmi Note 8 Pro Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.8.5.1065 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 8.1.0; MI 6X Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 8.1.0) NABar/1.0" ,
                "Mozilla/5.0 (Linux; Android 7.0; BTV-W09 Build/HUAWEIBEETHOVEN-W09; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.7 baiduboxapp/11.13.5.12 (Baidu; P1 7.0)" ,
                "Mozilla/5.0 (Linux; U; Android 9; zh-CN; Redmi 6 Pro Build/PKQ1.180917.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.3.6.1016 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 8.1.0; 1803-A01 Build/OPM1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.0.11 (Baidu; P1 8.1.0)" ,
                "Mozilla/5.0 (Linux; U; Android 9; zh-CN; RVL-AL09 Build/HUAWEIRVL-AL09) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.8.5.1065 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 10; LIO-AN00 Build/HUAWEILIO-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 10) NABar/1.0" ,
                "Mozilla/5.0 (Linux; Android 9; RMX1971 Build/PKQ1.190101.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; OPPO R11s Build/OPM1.171019.011) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/10.1 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 9; ARE-AL10 Build/HONORARE-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.16 lite baiduboxapp/4.11.5.11 (Baidu; P1 9)" ,
                "Mozilla/5.0 (iPhone; CPU iPhone OS 11_3_1 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0 MQQBrowser/10.0.2 Mobile/15B87 Safari/604.1 QBWebViewUA/2 QBWebViewType/1 WKType/1" ,
                "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/13.0 MQQBrowser/10.0.1 Mobile/15B87 Safari/604.1 QBWebViewUA/2 QBWebViewType/1 WKType/1" ,
                "Mozilla/5.0 (Linux; U; Android 5.1; zh-CN; OPPO R9km Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.4.9.941 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 8.1.0; V1732A Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.18 SP-engine/2.14.0 baiduboxapp/11.18.0.12 (Baidu; P1 8.1.0)" ,
                "Mozilla/5.0 (Linux; Android 8.1.0; vivo Y85 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 8.1.0)" ,
                "Mozilla/5.0 (Linux; Android 10; EML-AL00 Build/HUAWEIEML-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.12 baiduboxapp/11.12.0.10 (Baidu; P1 10)" ,
                "Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; Redmi 5A Build/OPM1.171019.026) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/10.1 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 6.0.1; 10 Build/RB3N5C; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/68.0.3440.91 Mobile Safari/537.36 MQQBrowser/6.6" ,
                "Mozilla/5.0 (Linux; Android 9; SM-G8870 Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; Android 10; ONEPLUS A6010 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Mobile Safari/537.36 baiduboxapp/11.10.0.12 (Baidu; P1 10)" ,
                "Mozilla/5.0 (Linux; U; Android 7.1.1; zh-cn; MI MAX 2 Build/NMF26F) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/9.1 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; Android 6.0.1; OPPO R9sk Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 6.0.1)" ,
                "Mozilla/5.0 (Linux; Android 9; vivo X21A Build/PKQ1.180819.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9) NABar/1.0" ,
                "Mozilla/5.0 (Linux; Android 8.1.0; NX611J Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.3 baiduboxapp/11.3.6.11 (Baidu; P1 8.1.0)" ,
                "Mozilla/5.0 (Linux; Android 8.0.0; STF-AL10 Build/HUAWEISTF-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.0.11 (Baidu; P1 8.0.0)" ,
                "Mozilla/5.0 (Linux; Android 9; MI 8 Lite Build/PKQ1.181007.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.5 baiduboxapp/11.5.0.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; Android 8.1.0; V1813BT Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 8.1.0)" ,
                "Mozilla/5.0 (Linux; Android 8.0.0; KNT-AL10 Build/HUAWEIKNT-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.13 baiduboxapp/11.13.0.10 (Baidu; P1 8.0.0)" ,
                "Mozilla/5.0 (Linux; U; Android 9; zh-cn; MI 8 SE Build/PKQ1.181121.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.7.34" ,
                "Mozilla/5.0 (Linux; Android 9; PCLM10 Build/PKQ1.190626.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; Android 9; V1832A Build/PKQ1.190302.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; Android 6.0.1; OPPO A57 Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 6.0.1) NABar/1.0" ,
                "Mozilla/5.0 (Linux; Android 10; MIX 3 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 10)" ,
                "Mozilla/5.0 (Linux; Android 10; HMA-AL00 Build/HUAWEIHMA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.83 Mobile Safari/537.36 T7/11.12 baiduboxapp/11.12.0.10 (Baidu; P1 10)" ,
                "Mozilla/5.0 (Linux; Android 10; POT-AL00a Build/HUAWEIPOT-AL00a; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Mobile Safari/537.36 baiduboxapp/11.0.5.12 (Baidu; P1 10)" ,
                "Mozilla/5.0 (Linux; Android 9; MI CC9 Pro Build/PKQ1.190302.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; Android 9; MI 8 Build/PKQ1.180729.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045114 Mobile Safari/537.36 V1_AND_SQ_8.2.6_1320_YYB_D QQ/8.2.6.4370 NetType/WIFI WebP/0.3.0 Pixel/1080 StatusBarHeight/89 SimpleUISwitch/1" ,
                "Mozilla/5.0 (Linux; Android 8.1.0; PBFM00 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 8.1.0)" ,
                "Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; Redmi 5 Plus Build/OPM1.171019.019) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.8.12" ,
                "Mozilla/5.0 (Linux; U; Android 9; zh-cn; Redmi Note 7 Build/PKQ1.180904.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.7.30" ,
                "Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 10)" ,
                "Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045120 Mobile Safari/537.36 V1_AND_SQ_8.2.7_1334_YYB_D QQ/8.2.7.4410 NetType/WIFI WebP/0.3.0 Pixel/1080 StatusBarHeight/90 SimpleUISwitch/1" ,
                "Mozilla/5.0 (Linux; Android 7.1.1; OPPO R11s Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 7.1.1)" ,
                "Mozilla/5.0 (Linux; Android 8.1.0; PBAT00 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 8.1.0)" ,
                "Mozilla/5.0 (Linux; Android 9; LYA-AL10 Build/HUAWEILYA-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; Android 9; STK-AL00 Build/HUAWEISTK-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9)" ,
                "Mozilla/5.0 (Linux; Android 9; PCNM00 Build/PKQ1.190630.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 9) NABar/1.0" ,
                "Mozilla/5.0 (Linux; U; Android 7.1.1; zh-cn; Mi Note 3 Build/NMF26X) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/10.0 Mobile Safari/537.36" ,
                "Mozilla/5.0 (Linux; U; Android 6.0.1; zh-cn; MI NOTE LTE Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.0.10" ,
                "Mozilla/5.0 (Linux; U; Android 9; zh-cn; MI 8 Lite Build/PKQ1.181007.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.8.12" ,
                "Mozilla/5.0 (Linux; Android 10; OXF-AN10 Build/HUAWEIOXF-AN10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/11.19 SP-engine/2.15.0 baiduboxapp/11.19.5.10 (Baidu; P1 10)" ,
                "Mozilla/5.0 (Linux; U; Android 9; zh-cn; MI 8 Build/PKQ1.180729.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.8.12" ,
        };
        public static String[] windowUserAgents = {
                "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" ,
                "User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50" ,
                "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50" ,
                "User-Agent:Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0" ,
                "User-Agent:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)" ,
                "User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" ,
                "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" ,
                "User-Agent:Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" ,
                "User-Agent:Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11" ,
                "User-Agent:Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.11" ,
                "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; The World)" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SE 2.X MetaSr 1.0; SE 2.X MetaSr 1.0; .NET CLR 2.0.50727; SE 2.X MetaSr 1.0)" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 360SE)" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser)" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" ,
                "User-Agent:Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5" ,
                "User-Agent:Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5" ,
                "User-Agent:Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5" ,
                "User-Agent: Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" ,
                "User-Agent: MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" ,
                "User-Agent: Opera/9.80 (Android 2.3.4; Linux; Opera Mobi/build-1107180945; U; en-GB) Presto/2.8.149 Version/11.10" ,
                "User-Agent: Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13" ,
                "User-Agent: Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.337 Mobile Safari/534.1+" ,
                "User-Agent: Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 TouchPad/1.0" ,
                "User-Agent: Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/20.0.019; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.18124" ,
                "User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; Titan)" ,
                "User-Agent: UCWEB7.0.2.37/28/999" ,
                "User-Agent: NOKIA5700/ UCWEB7.0.2.37/28/999" ,
                "User-Agent: Openwave/ UCWEB7.0.2.37/28/999" ,
                "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; ) Opera/UCWEB7.0.2.37/28/999" ,
        };
        public static String userAgents1 = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" ;
        public static final String ACCEPT = "Accept" ;
        public static final String ACCEPT_CHARSET = "Accept-Charset" ;
        public static final String ACCEPT_ENCODING = "Accept-Encoding" ;
        public static final String ACCEPT_LANGUAGE = "Accept-Language" ;
        public static final String ACCEPT_RANGES = "Accept-Ranges" ;
        public static final String AUTHORIZATION = "Authorization" ;
        public static final String CACHE_CONTROL = "Cache-Control" ;
        public static final String CONNECTION = "Connection" ;
        public static final String COOKIE = "Cookie" ;
        public static final String Origin = "Origin" ;
        public static final String X_Requested_With = "X-Requested-With" ;
        public static final String CONTENT_LENGTH = "Content-Length" ;
        public static final String CONTENT_TYPE = "Content-Type" ;
        public static final String DATE = "Date" ;
        public static final String EXPECT = "Expect" ;
        public static final String FROM = "From" ;
        public static final String HOST = "Host" ;
        public static final String IF_MATCH = "If-Match " ;
        public static final String IF_MODIFIED_SINCE = "If-Modified-Since" ;
        public static final String IF_NONE_MATCH = "If-None-Match" ;
        public static final String IF_RANGE = "If-Range" ;
        public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since" ;
        public static final String KEEP_ALIVE = "Keep-Alive" ;
        public static final String MAX_FORWARDS = "Max-Forwards" ;
        public static final String PRAGMA = "Pragma" ;
        public static final String PROXY_AUTHORIZATION = "Proxy-Authorization" ;
        public static final String RANGE = "Range" ;
        public static final String REFERER = "Referer" ;
        public static final String TE = "TE" ;
        public static final String UPGRADE = "Upgrade" ;
        public static final String USER_AGENT = "User-Agent" ;
        public static final String VIA = "Via" ;
        public static final String WARNING = "Warning" ;
    }
}